package cn.edu.tjufe.llp.tin.advice;

public class DuplicateKeyToMsg {
    public static String duplicateKeyToMsg(String key){
        if (key == null){
            return "";
        }
        String result;
        switch (key){
            case "ux_bsc_book_name_author":
            case "bsc_book.ux_bsc_book_name_author":
                result = "图书信息的书名和作者组合重复。";
                break;
            default:
                result = "未知的约束：" + key;
        }

        return result;
    }
}
